/*
 * ResourceProducerUnitVisitor.h
 *
 *  Created on: Nov 16, 2008
 *      Author: Ryan
 */

#ifndef RESOURCEPRODUCERUNITVISITOR_H_
#define RESOURCEPRODUCERUNITVISITOR_H_

#include "../../../OOInterface/Interfaces/UnitVisitor.h"
#include "../../../OOInterface/Objects/Resource.h"
#include "../../../OOInterface/AIInterface.h"
#include "../../../OOInterface/Objects/GameMap.h"
#include "../../../OOInterface/Objects/Point3.h"

class ResourceProducerUnitVisitor: public OOInterface::UnitVisitor
{
public:
	ResourceProducerUnitVisitor( const OOInterface::Resource& r, const OOInterface::ResourceList& list, const OOInterface::GameMap& map, const OOInterface::Point3f& loc );
	virtual ~ResourceProducerUnitVisitor();

	inline float getUnitRating() const { return _rating; }
	inline void reset() { _rating = 0.0f; }

	//Methods specified by UnitVisitor Interface:
	virtual void visitUnit( const OOInterface::Unit& u );
	virtual void visitAirAspect( const OOInterface::AirAspect& a );
	virtual void visitLandAspect( const OOInterface::LandAspect& a );
	virtual void visitWaterAspect( const OOInterface::WaterAspect& a );
	virtual void visitBuilderAspect( const OOInterface::BuilderAspect& a );
	virtual void visitBuildingAspect( const OOInterface::BuildingAspect& a );
	virtual void visitTransportAspect( const OOInterface::TransportAspect& a );
	virtual void visitReclaimableAspect( const OOInterface::ReclaimableAspect& a );
	virtual void visitResourceExtractorAspect( const OOInterface::ResourceExtractorAspect& a );

private:
	float _rating;

	const OOInterface::Resource& _resource;
	const OOInterface::ResourceList& _resourceList;

	const OOInterface::Point3f& _location;
	const OOInterface::GameMap& _map;
};

#endif /* RESOURCEPRODUCERUNITVISITOR_H_ */
